import request from '@/utils/axios-request.js'

const MENU_BASE_URL = "/api/v1/setting/menu";


const SettingMenuAPI = {
    getList() {
        return request({
            url: `${MENU_BASE_URL}`,
            method: 'GET',
        })
    },
    getFormData(id) {
        return request({
            url: `${MENU_BASE_URL}/${id}`,
            method: "get",
        });
    },
    add(data) {
        return request({
            url: `${MENU_BASE_URL}`,
            method: 'POST',
            data
        })
    },
    update(id, data) {
        return request({
            url: `${MENU_BASE_URL}/${id}`,
            method: 'put',
            data
        })
    }
}

export default SettingMenuAPI